\magnification=\magstep1
\input nice
%%\input amiga	% amiga.tex is in the formatfile
\hsize = 5 in
\vsize = 7.7 in
\voffset = 0.4in

\def\mynum#1{\ifnum #1<10 0\the#1\else \the#1\fi}
\def\mymonth#1{\ifcase#1 \or January \or February \or March \or April
   \or May \or June \or July \or August
   \or September \or Oktober
   \or November \or December \fi}

\def \TeXFormat {\TeX Format}

\book
\contentslevel=3
\contfill={\dotfill}
\contskip=7pt
\let\scstyle=\bf
\font\subsubsectiontitlefont=cmr10 scaled \magstep1

\titlepage
\vskip 1in
\title{\TeXFormat}
\removelastskip
\smallskip
\title{A GUI for selecting \TeX{} format files}
\bigskip
\release{Version 2.00}
\smallskip
\release {\mymonth{\month} \mynum{\day}, \mynum{\year}}
\bigskip
\author{by}
\author{Richard B\"odi}
\vfill
\abstract{
   \TeXFormat{} is a program that enables you to select \TeX{} format
   files easily. The program scans the directory where your
   \TeX{} format files reside and creates an array of radiobuttons
   of the appropriate size. Moreover the program shows the filenotes
   of the format files making it easier to remember the purposes of the
   format files. There are two versions of the program. A very flexible
   one based an Stefan Stuntz's MagicalUserInterface (MUI) and a less
   nice non-MUI version (of the same functionality).
}
\vskip 0.5in
\endtitlepage



\medskip
\plainsection{Contents}
\medskip
\makecontents
%%\newpage

\section{Copyright}

\TeXFormat{} is a ``freely distributable copyrighted software'',
i\thinspace e.\thinspace everyone may copy and use it, but the
copyright remains by myself (Richard B\"odi).

\TeXFormat{} may not be sold commercially without permission.
It may not be part of any PD series except Fred Fish's AmigaLibDisks.
Permission to modify the software is granted, but not the right to
distribute the modified code or only part of the files.

Thanks go to Stefan Stuntz for his MagicalUserInterface. The MUI version of
\TeXFormat{} is my first step in programming with MUI and I think I really like it.
My advise for every Amiga owner is: get a registrated version of MUI and watch
out for new MUI based applications which surely will appear in the near future.
Last not least I want to thank Fred Fish for
the continuing release of his library disks.


\section{Introduction}
Have you ever worked with several different \TeX{} format files when typesetting
with \TeX{}? One format file for your letters, another one for program
documentations, and many others for typesetting the documents of your friends?
Do you have to switch between format files containing hyphenation tables
for different languages? If your answer to one of these questions is 'Yes',
you will surely admit that setting an environment variable is not the most
comfortable way for selecting \TeX{} format files.
This is why I wrote \TeXFormat{}. This program enables you to select \TeX{} format
files easily via an array of radiobuttons.

\section{Running \TeXFormat}

The \TeXFormat{} program can either be executed in a shell using parameters
or from Workbench using ToolTypes.

\subsection{Running \TeXFormat{} from the CLI}
\medskip
\settabs\+{\bf Format}:  {\tt TeXFormat} & \cr
\+ {\bf Format}: {\tt TeXFormat} & {\tt CURRENTFORMAT=<env-variable>} \cr
\+ & {\tt FORMATPATH=<path for \TeX{} formats>} \cr
\+ & {\tt [PUBSCREEN=<PubScreen>]} \cr
\+ & {\tt [PATTERN=<file pattern for format files>]} \cr
\smallskip
\noindent {\bf Pattern}: {TeXFormat CURRENTFORMAT/K, FORMATPATH/K, PUBSCREEN/K, PATTERN/K}
\medskip
Description of the command line options:
\smallskip
\staggered{\tt CURRENTFORMAT\ }
\key{\tt CURRENTFORMAT}
   Specifies the environment variable which contains the name of the
   format files that \TeX{} should use.\hfill\break
   Example for Pas\TeX: {\tt CURRENTFORMAT=texformat}.
\key{\tt FORMATPATH}
   The full path to your \TeX{} format files.\hfill\break
   Example : {\tt FORMATPATH=tex:formats}.
\key{\tt PUBSCREEN}
   This keyword is only available for the non-MUI version.\hfill\break
   Specifies the name of the public screen on which \TeXFormat{} should open its
   window. Default is the default public screen.\hfill\break
   Example: {\tt SCREEN=ShowDVI-PubScr} opens the \TeXFormat{} window on the ShowDVI
   previewer screen (ShowDVI is the previewer of the PasTeX implementation).\hfill\break
   The public screen for the MUI version can be determined by using the screen
   manager of the MUI preference program, see the documentation of MUI.
\key{\tt PATTERN}
   Specifies the file pattern for \TeX{} format files.\hfill\break
   Example : {\tt PATTERN=\#?.fmt}.
\endstaggered

\subsection{Running \TeXFormat{} from Workbench}

When running \TeXFormat{} from Worbench the parameters are specified
by ToolTypes which can be edited by the Workbench's Info command.

\subsubsection{CURRENTFORMAT Tooltype}
   Specifies the environment variable which contains the name of the
   format files that \TeX{} should use.

\subsubsection{FORMATPATH Tooltype}
   The full path to your \TeX{} format files.

\subsubsection{PUBSCREEN Tooltype}
   This keyword is only available for the non-MUI version.\hfill\break
   Specifies the name of the public screen on which \TeXFormat{} should open its
   window. Default is the default public screen.\hfill\break
   The public screen for the MUI version can be determined by using the screen
   manager of the MUI preference program.

\subsubsection{PATTERN Tooltype}
   Specifies the file pattern for \TeX{} format files.


\section{Selecting a \TeX{} format file}
To select a \TeX{} format file, simply click on the corresponding radiobutton.
The environment variable specified by the CURRENTFORMAT parameter
is set immediately after this operation. So you don't have to quit the program
to set the \TeX{} format file.\hfill\break
The {\tt 'SAVE'} button copies the current setting to the environment archive
{\tt EnvArc:}. You can quit the program either by pressing the {\tt 'DONE'} button,
by selecting {\tt Quit} from the menu, by closing \TeXFormat's window, or by
pressing {\tt AMIGA-Q} (or the key 'D' in the MUI version).

\section{Menu description}
The \TeXFormat{} program has only one menu which is the File menu. It has
only two items, namely the {\tt About} and the {\tt Quit} item. I think
the purpose of both of these items is clear enough to omit an explanation.

\section{Filenotes}
In addition to the selection of format files, \TeXFormat{} shows the filenotes
of the format files. Let's assume we have three format files {\tt plain},
{\tt gplain} and {\tt lplain}. Since we want to be more verbose, we store a
comment to each of these files in a filenote, for example
\smallskip
{\tt filenote plain "Plain \TeX{}"}\hfill\break
{\tt filenote gplain "Plain \TeX{}, german hyphenation"}\hfill\break
{\tt filenote lplain "La\TeX{}".}
\smallskip
After that, when starting the non-MUI version of \TeXFormat{}, we
see three radiobuttons labelled with
\smallskip
{\tt plain\ \ \ \ Plain \TeX{}}\hfill\break
{\tt gplain\ \ \ Plain \TeX{}, german hyphenation}\hfill\break
{\tt lplain\ \ \ La\TeX{}}
\smallskip
The MUI version of \TeXFormat{} behaves a bit different. It shows three
radiobuttons labelled with
\smallskip
{\tt plain}\hfill\break
{\tt gplain}\hfill\break
{\tt lplain}
\smallskip
Only the filenote of the selected format file is shown in a text field
below the radiobuttons. But now, the filenotes may contain multiple lines
by simply adding a C-style '\\n'. For example, when setting
\smallskip
{\tt filenote gplain "Plain \TeX{}\\ngerman hyphenation"}\par
\smallskip
we obtain the two lines 'Plain \TeX{}' and 'german hyphenation'. Note that
this feature is only available for the MUI version.

\section{Required software and hardware}
$\bullet$ An Amiga, of course. \hfill\break
$\bullet$ Kickstart 2.04 or higher. \hfill\break
$\bullet$ A \TeX{} implementation. \hfill\break
$\bullet$ A \TeX{} file to typeset. \hfill\break
$\bullet$ A \TeX nician (not required). \hfill\break

\vskip 1cm

If you have any remarks (if you like the program or if not) or suggestions
for improvements feel free to contact me:
\bigskip

Richard A. B\"odi \hfill\break
Mathematisches Institut \hfill\break
Universit\"at T\"ubingen \hfill\break
Auf der Morgenstelle 10 \hfill\break
72076 T\"ubingen \hfill\break
GERMANY \hfill\break
\medskip
e-mail (Internet) : mmisa01@mailserv.zdv.uni-tuebingen.de\hfill\break

\bye
